package com.prp.db.po;

/**
 * NeighbourRelationshipId entity. @author MyEclipse Persistence Tools
 */

public class NeighbourRelationshipId implements java.io.Serializable {

	// Fields

	private Integer fromId;
	private Integer toId;

	// Constructors

	/** default constructor */
	public NeighbourRelationshipId() {
	}

	/** full constructor */
	public NeighbourRelationshipId(Integer fromId, Integer toId) {
		this.fromId = fromId;
		this.toId = toId;
	}

	// Property accessors

	public Integer getFromId() {
		return this.fromId;
	}

	public void setFromId(Integer fromId) {
		this.fromId = fromId;
	}

	public Integer getToId() {
		return this.toId;
	}

	public void setToId(Integer toId) {
		this.toId = toId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof NeighbourRelationshipId))
			return false;
		NeighbourRelationshipId castOther = (NeighbourRelationshipId) other;

		return ((this.getFromId() == castOther.getFromId()) || (this
				.getFromId() != null
				&& castOther.getFromId() != null && this.getFromId().equals(
				castOther.getFromId())))
				&& ((this.getToId() == castOther.getToId()) || (this.getToId() != null
						&& castOther.getToId() != null && this.getToId()
						.equals(castOther.getToId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getFromId() == null ? 0 : this.getFromId().hashCode());
		result = 37 * result
				+ (getToId() == null ? 0 : this.getToId().hashCode());
		return result;
	}

}